;Serial settings and constants

;Serial port register address
         SRB    EQU      00H ; Serial Receiver Buffer Register (R)
         STB   EQU      00H ; Serial Transmitter Holding Register(W)  
         SIER    EQU     01H ; Serial Interrupte Enable Register (w)
         IIR    EQU      02H ; Interrupt Identification Register (R)
         SMD   EQU      03H ; Serial Line Control Register
         SST    EQU     05H ; Serial Line Status Register
         DLL   EQU      00H ; Divisor Latch Least Significant BYTE
         DLM   EQU      01H ; Divisor Latch most  Significant BYTE

;Definition of content of SST register
;|Not Use|TE|THRE|BI|FE|PE|OE|DR|
;TE Transmitter empty
;THRE Transmittor Holding Register Empty
;BI Breakr Interrupt
;FE Framing Error
;PE Parity Error
;OE Overrun Error 
;DR Data Ready
          REC_RDY    EQU   00000001B
          TRAN_RDY   EQU   00100000B
          ERR_DET    EQU   00001110B
          BREAK_DET  EQU   00010000B
;Definition of content of Serial Line Control Register
        SMD_DATA     EQU    00000111B
        S_INT_ENA    EQU    00000011B
        S_INT_DIS    EQU    00000000B
		


;Received_state:
    Serial_wait_for_poll EQU 00H
	Serial_check_ID_state EQU 01H
    Serial_Receiving EQU 02H
	Serial_check_Type_state EQU 03H
		
	 	 
;Serial_received_status:
    Serial_no_data_in_RBuffer EQU 00H
    Serial_has_packet_in_RBuffer EQU 01H
	
;server-active_status
	Serial_Not_Active  EQU 00H
	Serial_Active EQU 01H
	
;Serial_Tbuffer_status
    Serial_Tbuffer_free EQU 00H
	Serial_Tbuffer_full EQU 01H
	Serial_Tbuffer_copying EQU 02H
	
	
;Serial_Transmit_state
	Serial_not_transmitting EQU 00H
	Serial_transmitting EQU 01H
	
;Serial_Type_1_serial_observed
	Serial_T1_not_observed EQU 00H
	Serial_T1_is_observed EQU 01H
		
